package com.gmall.web.service;

import com.gmall.web.model.Clazz;
import com.gmall.web.model.Student;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ClazzService {

    public List<Clazz> getClazzList(){
        List studentList_2203A = new ArrayList();
        studentList_2203A.add(new Student("zhangsan",18,"2203A"));
        studentList_2203A.add(new Student("lisi",23,"2203A"));
        studentList_2203A.add(new Student("wangwu",21,"2203A"));
        studentList_2203A.add(new Student("zhaoliu",25,"2203A"));

        List studentList_2203B = new ArrayList();
        studentList_2203B.add(new Student("zhangsan1",18,"2203B"));
        studentList_2203B.add(new Student("lisi1",23,"2203B"));
        studentList_2203B.add(new Student("wangwu1",21,"2203B"));
        studentList_2203B.add(new Student("zhaoliu1",25,"2203B"));

        List<Clazz> clazzList = new ArrayList();
        Clazz clazz_2203A = new Clazz();
        clazz_2203A.setName("2203A");
        clazz_2203A.setStudentList(studentList_2203A);

        Clazz clazz_2203B = new Clazz();
        clazz_2203B.setName("2203B");
        clazz_2203B.setStudentList(studentList_2203B);

        clazzList.add(clazz_2203A);
        clazzList.add(clazz_2203B);

        return clazzList;
    }
}
